Auto-adjusting high accuracy oscillator

ABSTRACT

An auto-adjusting high accuracy oscillator is disclosed, which comprises: a frequency comparator, for comparing a synchronization signal obtained from a USB host with an oscillation signal obtain from a device; a control tuning circuit, further comprising a counter and an adder/sub circuit; and an oscillating element; wherein a variation is obtained by the counting of the counter while transmitting the variation to the adder/sub circuit to be encoded thereby into a digital code so as to enable the oscillating element to perform a frequency up/down operation accordingly for approaching the synchronization signal successively.

FIELD OF THE INVENTION

The present invention relates to an auto-adjusting high accuracyoscillator, and more particularly, to an auto-adjusting oscillator foran universal-serial-bus (USB) interface that is capable of matching aninternal clock to a data stream inputted from the USB interface byapproaching the difference between two to be within 1% error rate,whereas the auto-adjusting oscillator is an internal non-quartzoscillator so that it is a compact and cost-saving device withauto-adjusting mechanism capable of being adapted for any specificationsof USB protocol.

BACKGROUND OF THE INVENTION

It is known that the use of an auto-adjusting oscillator is tosynchronize an internal clock to the data rate of an USB interface forensuring data to be transmitted accurately and stably. Conventionalapproaches for matching an internal clock to an incoming data stream,such as Phase Lock Loops (PLL) and/Delay Lock Loops (DLL), are notappropriate to be used for locking a data stream inputted from an USBinterface by the following reasons:

-   (1) Such conventional approaches, e.g. PLL and DLL, typically    require a continuous stream of input reference clocks to match the    data rate of incoming data, however, such continuous stream is not    available in data communication systems using USB interface.-   (2) Such conventional approaches, e.g. PLL and DLL, typically    require a very long data training sequence, however, such a long    data training sequence will require a long locking time that is not    suitable for USB interface with short and bursty data packets.-   (3) Such conventional approaches, e.g. PLL and DLL, typically    require a precision timing component for preventing timing error,    however, such precision timing component is usually not available in    USB applications.

From the above description, it is clear that those conventionalapproaches, such as PLL and DLL, are not suitable to be applied in USBapplications.

SUMMARY OF THE INVENTION

In view of the disadvantages of prior art, the primary object of thepresent invention is to provide an auto-adjusting high accuracyoscillator for an universal-serial-bus (USB) interface that is capableof matching an internal clock to a data stream inputted from the USBinterface by approaching the difference between two to be within 1%error rate, whereas the auto-adjusting oscillator is an internalnon-quartz oscillator so that it is a compact and cost-saving devicewith auto-adjusting mechanism capable of being adapted for anyspecifications of USB protocol, such as USB 1.1 and USB 2.0, etc.

It is another object of the invention to provide an auto-adjusting highaccuracy oscillator with internal feedback circuit for detecting andcalibrating oscillating frequency, in which a detection circuit is usedfor automatically detecting the frequency difference between an USBsignal and an oscillating frequency generated from an oscillator whilecalibrating and approaching the oscillating frequency to be within 1%error rate of the USB signal by a means of successive-approximation.

To achieve the above objects, the present invention provides anauto-adjusting high accuracy oscillator, comprising:

-   a frequency comparator, for comparing a synchronization signal    obtained from a USB host with an oscillation signal obtain from a    device so as to obtain a frequency difference between the two;-   a control tuning circuit, further comprising a counter and an    adder/sub circuit, for received the frequency difference received    form the frequency comparator and using the same as an adjusting    reference; and-   an oscillating element;-   wherein, a variation is obtained by the counting of the counter    while transmitting variation and the adjusting reference to the    adder/sub circuit to be encoded thereby into a digital code so as to    enable the oscillating element to perform a frequency up/down    operation according to a frequency calibrating parameter generated    by the control tuning circuit with respect to the digital code, and    thus enable the frequency of the oscillation signal to approach that    of the synchronization signal successively.

Further, to achieve the above objects, the present invention provides anauto-adjusting high accuracy oscillator, comprising:

-   a frequency comparator, for comparing a synchronization signal    obtained from a USB host with an oscillation signal obtain from a    device so as to obtain a frequency difference between the two;-   a control tuning circuit, further comprising a charge pump and an    analog/digital (A/D) converter, capable of generating a digital code    encoded in response to the frequency difference; and-   an oscillating element;-   wherein, the oscillating element is enabled to perform a frequency    up/down operation with respect to the digital code so as to enable    the frequency of the oscillation signal to approach that of the    synchronization signal successively.

Yet, to achieve the above objects, the present invention furtherprovides an auto-adjusting high accuracy oscillator, comprising:

-   a frequency comparator, for comparing a synchronization signal    obtained from a USB host with an oscillation signal obtain from a    device so as to obtain a frequency difference between the two;-   a control tuning circuit, further comprising a time-to-digital    circuit, capable of generating a digital code encoded in response to    the frequency difference; and-   an oscillating element;-   wherein, the oscillating element is enabled to perform a frequency    up/down operation with respect to the digital code so as to enable    the frequency of the oscillation signal to approach that of the    synchronization signal successively.

Other aspects and advantages of the present invention will becomeapparent from the following detailed description, taken in conjunctionwith the accompanying drawings, illustrating by way of example theprinciples of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a first embodimentof the present invention.

FIG. 2 is a schematic diagram depicting an adjustment applying theauto-adjusting high accuracy oscillator of the present invention.

FIG. 3 is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a second embodimentof the present invention.

FIG. 4 is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a third embodimentof the present invention.

FIG. 5 is a profile depicting the relation between error and SYN numberaccording to the present invention.

FIG. 6 is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a fourth embodimentof the present invention.

FIG. 7A is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a fifth embodimentof the present invention.

FIG. 7B is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a sixth embodimentof the present invention.

FIG. 7C is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a seventhembodiment of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

For your esteemed members of reviewing committee to further understandand recognize the fulfilled functions and structural characteristics ofthe invention, several preferable embodiments cooperating with detaileddescription are presented as the follows.

It is preferred to activate an auto-adjusting circuit for adjusting anoscillating element to match an internal clock to a data stream inputtedfrom an USB interface as soon as a complete 1 bit rate of asynchronization signal is obtained while the synchronization signal isbeing inputted from the USB interface, so that the data transmission canbe synchronized and thus the accuracy of data to be received can beenhanced. The synchronization signal is referred as SYNC signalhereinafter.

Please refer to FIG. 1 and FIG. 2, which are respectively a schematicdiagram illustrating the functional blocks of an auto-adjusting highaccuracy oscillator according to a first embodiment of the presentinvention and a schematic diagram depicting an adjustment applying theauto-adjusting high accuracy oscillator. As seen in FIG. 1 and FIG. 2,as soon as the frequency comparator 12 receives a SYNC signal 11, itwill compare the bit rates of the inputted SYNC signal 11 and anoscillation signal being fed back from the oscillating element 14 so asto obtain an frequency error of the oscillator 14, and then theresulting frequency error is fed to the control tuning circuit 13 forenabling the same to generate an adjusting signal in response theretoautomatically, and then the adjusting signal is sent to the oscillatingelement 14 for adjusting oscillation signal of the oscillating element14 accordingly, and thereafter, the adjusted oscillation signal is fedback to the frequency comparator 12 so as to form a feedback loop untilthe oscillation signal of the oscillating element 14 can match the SYNCsignal 11 to the extend that the error is below is 1%.

The auto-adjusting oscillator of FIG. 1 comprises a frequency comparator12, a control tuning circuit 13 and an oscillating element 14, which isused to match an internal clock to a data stream inputted from the USBinterface by approaching the difference between two to be within 1%error rate.

Please refer to FIG. 3, which is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a second embodiment of the present invention. Theauto-adjusting high accuracy oscillator of FIG. 3 comprises: a frequencycomparator 22, further comprising a pulse detector 221 for detecting andcomparing a SYNC signal 21 obtained from a USB host with an oscillationsignal obtain from a device so as to obtain a frequency differencebetween the two; a control tuning circuit 23, further comprising acounter 231 and an adder/sub circuit 232, for received the frequencydifference received form the frequency comparator and using the same asan adjusting reference; and an oscillating element 24; a variation isobtained by the counting of the counter while transmitting variation andthe adjusting reference to the adder/sub circuit 232 to be encodedthereby into a digital code so as to enable the oscillating element 24to perform a frequency up/down operation according to a frequencycalibrating parameter generated by the control tuning circuit 23 withrespect to the digital code, and thus enable the frequency of theoscillation signal to approach that of the SYNC signal 21 successively.Moreover, the frequency-adjusting method of the oscillating element 24is defined by the control tuning circuit 23 that the half of thefrequency difference between the SYNC signal and the oscillating signalis employed as the amount of frequency to be adjusted in each feedback,e.g. the first adjustment is (½)×(frequency difference), and the secondadjustment is (½)×(½)×(frequency difference), and so on. The aforesaidfrequency-adjusting method is referred as successive-approximationmethod, which is capable of approaching the difference between two to bewithin 1% error rate, and being adapted for any specifications of USBprotocol.

Please refer to FIG. 4, which is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a third embodiment of the present invention. In FIG. 4, theauto-adjusting oscillator is activated as soon as a packet of a SYNCsignal 31 inputted from the data input end 31 is received thereby, inwhich a pulse detector 32 is used to compare the SYNC signal 31 and afeedback oscillation signal generated by the oscillating element 37 soas to identify a time error (ΔT) of time domain between the two, andthen the time error (ΔT) is being converted into a voltage error (ΔV) bythe charge pump 33, and then the voltage error (ΔV) is first beingcompared with a reference voltage generated by a bandgap referencecircuit and the is being sent to the analog-digital converter 34 forenabling the same to generate an M signal according to be used by thecontrol tuning circuit 36 as adjusting reference.

As soon as the generating of the M signal, the control unit 35 isenabled to inform the control tuning circuit 36. As the control tuningcircuit 36 is informed of the M signal, the latch circuit 361 is enabledto perform a code locking operation for defining an A-code in responseto the M signal and the counter 363 will also start counting fordefining a B-code basing on the counting, and then the A-code and theB-code is being transmitted to the adder/sub circuit 362 for enablingthe same to generate an S-code being used to control the oscillatingelement 37. Preferably, the S-code must satisfy the resolution ofminimum error and the oscillation frequency range of the oscillatingelement 37.

Moreover, the initial change of oscillation frequency should fulfill thespecification of USB protocol with the tolerance of 5%, otherwise, thedata transmission can be interrupt or mistaken. The oscillationfrequency of the oscillating element 37 is adjust in response to theS-code corresponding to the control tuning circuit 36, that is, theoscillating element 37 will change its oscillation frequency each timewhen it receive an S-code so as to enable the changed oscillationfrequency to approach the SYNC signal successively until the error rateis lower than 1%. It is noted that initial time of frequency change isthe time that a packet of SYNC signal is received by the auto-adjustingoscillator of FIG. 4.

Furthermore, the interactive operations between each functional blocksof FIG. 4 is controlled by the control unit 35 for controlling theadjustment of pulses of the control tuning circuit 36 and the timing ofcapturing the M signal so as to ensure data to be transmitted accuratelyand then to be sent to the micro control unit 39, whereas theinteractive operations comprises the timing to activate anauto-adjusting operation, the frequency dividing operation of a divider38, and the charging/discharging of the charge pump 33 and the recoverytime thereof.

Please refer to FIG. 5, which is a profile depicting the relationbetween error and SYN number according to the present invention. The Xaxis is used for representing the number of the SYNC signal received andthe Y axis is used to represent the error rate (%) compared between anadjusted oscillation frequency and the SYNC signal. As each receiving ofa packet of SYNC signal, 4 bits of the packet (1 bit rate=1.5MHz−=666.67 ns) is fetched while each tuning is based on a basic unit of2 bits, i.e. the SYNC number is increased by every 2 bits. As seen inFIG. 6, there are six data lines respectively representing initial errorrate of 3%, 4%, 5%, 6%, 7%, and 8% that each is going to be reduced tounder 1% after being tuned by 6 times, i.e. after the SYNC number isincreased to be six.

As a packet of SYNC signal is received by an auto-adjusting oscillatorthrough the data input end, it can fetch four complete 1.5 MHz bit rateto be used for activating the control tuning circuit to adjust theoscillation frequency rapidly and accordingly. Sine only the SYNC signaltransmitted from the data input end is required as reference that it donot require the whole data stream to be transmitted form the data inputend, and also it do not require high pulse frequency for counting, theauto-adjusting oscillator will consume comparably less power and causeless error and thus there will be no frequency drift after beingsynchronized by the same. Because of an adjustment is performed as soonas a packet of SYNC signal is received, the auto-adjusting oscillator isstable and is suitable to be applied in application of USB 1.1 or USB2.0 specifications, and so on.

Please refer to FIG. 6, is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a fourth embodiment of the present invention. Theauto-adjusting high accuracy oscillator of FIG. 6 comprises a data inputend 51, a pulse detector 52, a fast/slow detector 53, asuccessive-approximation circuit 54, a control unit 55, an oscillatingelement 56 and an output pulse end 57. However, the configuration of theauto-adjusting high accuracy oscillator of the present invention is notlimited by the foregoing structure shown in FIG. 6. There are otherconfigurations as illustrated in FIG. 7A to FIG. 7C, just to mention afew.

Please refer to FIG. 7A, which is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a fifth embodiment of the present invention. Theauto-adjusting high accuracy oscillator of FIG. 7A comprises a pulsedetector 61, a charge pump 62, a more-bits analog/digital converter 63and a digitally controlled oscillator 64. The digitally controlledoscillator 64 is equipped with temperature compensating ability so thatthe output current and voltage thereof are free from the influence oftemperature change and thus each can be a stable value, that is, theoscillation frequency of the digitally controlled oscillator 64 is notsubject to the influence of temperature change. The auto-adjusting highaccuracy oscillator of FIG. 7A employs a method of direct oscillator,that is, the time error (ΔT) of the pulse detector 61 is converted intoa corresponding voltage error (ΔV) to be coded into a digital code bythe analog/digital converter 63 while the digital code is used tocontrol the adjusting of the oscillator 64. By the use of the aforesaiddirect converter, the error rate can be reduced to below 1% by just oneadjusting of oscillation frequency with respect to one analysis of SYNCsignal. However, the circuit of that shown in FIG. 7 is comparativelyharder to design sine it will require much precise matching betweenfunctional blocks thereof.

Please refer to FIG. 7B, which is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a sixth embodiment of the present invention. Theauto-adjusting high accuracy oscillator of FIG. 7B comprises a pulsedetector 71, a charge pump 72, a one-bit analog/digital converter 73, asuccessive-approximation circuit 74 and a digitally controlledoscillator 75. The difference between those shown in FIG. 7A and FIG. 7Bis that the successive-approximation circuit 74 is added in the circuitso that the function of the more-bits analog/digital converter 63 ofFIG. 7A can be replace by the cooperation of the one-bit analog/digitalconverter 73 and the successive-approximation circuit 74. Although theadjusting efficiency of the oscillator of FIG. 7B is slower than thatshown in FIG. 7A, the circuit design of the oscillator of FIG. 7 iscomparably easier to be achieved.

Please refer to FIG. 7C, which is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a seventh embodiment of the present invention. Theauto-adjusting high accuracy oscillator of FIG. 7C comprises a pulsedetector 81, a time-to-digital converter 82, a successive-approximationcircuit 83, and a digital controlled oscillator 84. The differencebetween those shown in FIG. 7B and FIG. 7V is that the function providedby the cooperation of the charge pump 72 and the one-bit analog/digitalconverter 73 is completely replaced by the time-to-digital converter 82.

From the above description, the present can provide an auto-adjustinghigh accuracy oscillator for an universal-serial-bus (USB) interfacethat is capable of matching an internal clock to a data stream inputtedfrom the USB interface by approaching the difference between two to bewithin 1% error rate, whereas the auto-adjusting oscillator is aninternal non-quartz oscillator so that it is a compact and cost-savingdevice with auto-adjusting mechanism capable of being adapted for anyspecifications of USB protocol, such as USB 1.1 and USB 2.0, etc. Inaddition, the present can provide also provide an auto-adjusting highaccuracy oscillator with internal feedback circuit for detecting andcalibrating oscillating frequency, in which a detection circuit is usedfor automatically detecting the frequency difference between an USBsignal and an oscillating frequency generated from an oscillator whilecalibrating and approaching the oscillating frequency to be within 1%error rate of the USB signal by a means of successive-approximation.

While the preferred embodiment of the invention has been set forth forthe purpose of disclosure, modifications of the disclosed embodiment ofthe invention as well as other embodiments thereof may occur to thoseskilled in the art. Accordingly, the appended claims are intended tocover all embodiments which do not depart from the spirit and scope ofthe invention.

1. Auto-adjusting high accuracy oscillator, comprising: a frequencycomparator, for comparing a synchronization signal obtained from a USBhost with an oscillation signal obtain from a device so as to obtain afrequency difference between the two; a control tuning circuit, furthercomprising a counter and an adder/sub circuit, for received thefrequency difference received form the frequency comparator and usingthe same as an adjusting reference; and an oscillating element; wherein,a variation is obtained by the counting of the counter whiletransmitting variation and the adjusting reference to the adder/subcircuit to be encoded thereby into a digital code so as to enable theoscillating element to perform a frequency up/down operation accordingto a frequency calibrating parameter generated by the control tuningcircuit with respect to the digital code, and thus enable the frequencyof the oscillation signal to approach that of the synchronization signalsuccessively.
 2. The oscillator of claim 1, wherein the frequencycomparator further comprises a pulse detector.
 3. The oscillator ofclaim 1, wherein the oscillating element is a digitally controlledoscillator.
 4. The oscillator of claim 1, wherein the interactiveoperations of the frequency comparator and the control tuning circuit iscontrolled by a control unit for controlling the adjustment of pulses ofthe control tuning circuit and the timing of capturing electric signalsso as to ensure data to be transmitted accurately, whereas theinteractive operations comprises the timing to activate anauto-adjusting operation, the frequency dividing operation of a divider,and the charging/discharging of a charge pump and the recovery timethereof.
 5. Auto-adjusting high accuracy oscillator, comprising: afrequency comparator, for comparing a synchronization signal obtainedfrom a USB host with an oscillation signal obtain from a device so as toobtain a frequency difference between the two; a control tuning circuit,further comprising a charge pump and an analog/digital (A/D) converter,capable of generating a digital code encoded in response to thefrequency difference; and an oscillating element; wherein, theoscillating element is enabled to perform a frequency up/down operationwith respect to the digital code so as to enable the frequency of theoscillation signal to approach that of the synchronization signalsuccessively.
 6. The oscillator of claim 5, wherein the frequencycomparator further comprises a pulse detector.
 7. The oscillator ofclaim 5, wherein the oscillating element is a digitally controlledoscillator.
 8. The oscillator of claim 5, wherein the interactiveoperations of the frequency comparator and the control tuning circuit iscontrolled by a control unit for controlling the adjustment of pulses ofthe control tuning circuit and the timing of capturing electric signalsso as to ensure data to be transmitted accurately, whereas theinteractive operations comprises the timing to activate anauto-adjusting operation, the frequency dividing operation of a divider,and the charging/discharging of a charge pump and the recovery timethereof.
 9. Auto-adjusting high accuracy oscillator, comprising: afrequency comparator, for comparing a synchronization signal obtainedfrom a USB host with an oscillation signal obtain from a device so as toobtain a frequency difference between the two; a control tuning circuit,further comprising a time-to-digital circuit, capable of generating adigital code encoded in response to the frequency difference; and anoscillating element; wherein, the oscillating element is enabled toperform a frequency up/down operation with respect to the digital codeso as to enable the frequency of the oscillation signal to approach thatof the synchronization signal successively.
 10. The oscillator of claim9, wherein the frequency comparator further comprises a pulse detector.11. The oscillator of claim 9, wherein the oscillating element is adigitally controlled oscillator.
 12. The oscillator of claim 9 whereinthe interactive operations of the frequency comparator and the controltuning circuit is controlled by a control unit for controlling theadjustment of pulses of the control tuning circuit and the timing ofcapturing electric signals so as to ensure data to be transmittedaccurately, whereas the interactive operations comprises the timing toactivate an auto-adjusting operation, the frequency dividing operationof a divider, and the charging/discharging of a charge pump and therecovery time thereof.